home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qlib205.zip / QLIB.ZIP / TEST / FF.ASM < prev    next >
Assembly Source File  |  1996-11-18  |  710b  |  44 lines

  1. include qlib.inc
  2. include dos.inc
  3. include string.inc
  4. include stdio.inc
  5. include conio.inc
  6.  
  7. .data
  8.   fileblk ffblk <>
  9.  
  10. .code
  11. main proc
  12.   callp clrscr
  13.   callp findfirst,"*.*",10h,offset fileblk  ;DIRS!
  14.   .if eax==ERROR
  15.     jmp done1
  16.   .endif
  17. @@:
  18.   .if fileblk.ff_attrib==10h
  19.     callp printf,"\\%s\n",offset fileblk.ff_name
  20.   .endif
  21.   callp findnext,offset fileblk
  22.   .if eax==ERROR
  23.     jmp done1
  24.   .endif
  25.   jmp @b
  26. done1:
  27.   callp findfirst,"*.*",0h,offset fileblk  ;FILES!
  28.   .if eax==ERROR
  29.     jmp done2
  30.   .endif
  31. @@:
  32.   callp printf,"%s\n",offset fileblk.ff_name
  33.   callp findnext,offset fileblk
  34.   .if eax==ERROR
  35.     jmp done2
  36.   .endif
  37.   jmp @b
  38. done2:
  39.   ret
  40. main endp
  41.  
  42. end
  43.  
  44.